<?php
class Sabai_Template_Default_Helper_XiggRecentNodes extends Sabai_Template_Default_Helper
{
    function execute($limit = 10)
    {
        $model =& $this->_locator->getService('Model');
        $node_r =& $model->getRepository('Node');
        $criteria =& Sabai_Model_Criteria::createValue('node_hidden', 0);
        $nodes =& $node_r->fetchByCriteria($criteria, $limit, 0, array('node_priority', 'node_published'), array('DESC', 'DESC'));
        return $nodes;
    }
}